#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QWidget>
#include <QToolBar>
#include <QMainWindow>
#include <QGraphicsView>
#include <QAction>
#include <QToolBox>
#include <QButtonGroup>
#include <QList>
#include <QMultiMap>
#include <QString>
#include <QTimer>

#include <scene.h>
#include "algorithm.h"

namespace Ui {
class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT
    
public:
    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();
    
    void createCentralWidget();
    void createAlgorithms();
    void createToolBox();
    void createActions();
    void createToolBar();
    void resizeEvent(QResizeEvent *);

public slots:
    void algorithmChecked(int);
    void startTimer();
    void stopTimer();

private:
    Ui::MainWindow *ui;
    QWidget* mCentralWidget;
    Scene* mScene;
    QAction* mDebugAction;
    QAction* mNextStep;
    QAction* mPrevStep;
    QAction* mDrawBySteps;
    QGraphicsView* mView;
    QToolBox* mToolBox;
    QToolBar* mToolBar;
    QButtonGroup* mButtonGroup;
    QMultiHash<QString, Algorithm*> mAlgs;
    QTimer* mTimer;
};

#endif // MAINWINDOW_H
